const router = require('koa-router')();
const controller = require('../controller/c-signup')

router.prefix('/register')

// 注册页面
// router.get('/signup', controller.getSignup)

/**
 * @swagger
 * definition:
 *  registerParam: 
 *      properties:
 *          name:
 *              type: string
 *          password:
 *              type: string
 *          repeatpass:
 *              type: string
 *          avator:
 *              type: string
 *          phone:
 *              type: string
 *          email:
 *              type: string
 */

/**
 * @swagger
 * /register/signup:
 *   post:
 *     summary: 用户注册（后台管理员）
 *     description: 用户信息注册
 *     tags:
 *       - 注册用户信息
 *     produces:
 *       - application/json
 *     parameters:
 *       - name: "param"
 *         in: body
 *         required: true
 *         description: 用户名称
 *         type: string
 *         schema:
 *            $ref: '#/definitions/registerParam'
 *     responses:
 *       200:
 *         description: 成功获取
 */
// post 注册
router.post('/signup', controller.postSignup)

module.exports = router